<?php
class Actrole extends Zend_Db_Table {
	/**
	 * 表名
	 * @var string
	 */
	protected $_name = 'cc_actrole';
	/**
	 * DB
	 * @var $db;
	 */
	private $db;
	
	/**
	 * 构造函数
	 * @access public
	 * @return 
	 */
	public function __construct(){
		$this->db = Zend_Db_Table::getDefaultAdapter();
		parent::_setup();
	}
	
	/**
	 * 据角色取对应的动作
	 * @access public
	 * @var string 角色名/admin/sys之类
	 * @return array
	 */
	public function getActByRoleName($rolename){
		$where = $this->db->quoteInto('rolename=?',$rolename);
		$act = $this->fetchAll($where,'columnid');
		$actArr = $act->toArray();
		return $actArr;
	}
}
?>